Constrained codes modify input data in order to satisfy or impose some constraint on the input data. One example of a constrained code is a run-length limited (RLL) code, where the length of a run (e.g., consecutive zeros or ones) is limited to some range. For an RLL(d,k) code, the number of consecutive zeros between two ones cannot be less than d, nor can the number of consecutive zeros between two ones be larger than k. Another type of constrained code is a maximum transition run (MTR) code, where the number of transitions is limited. For example, an MTR(T) code imposes a limit of no more than T consecutive transitions in a sequence. It would be desirable if new techniques for code design and/or (e.g., hardware) implementation of corresponding encoders and decoders which satisfy both RLL and MTR constraints were developed. Some existing techniques, for example, cannot be applied to any code length and constraint directly, which makes implementing corresponding encoders and decoders for those codes extremely difficult. Putting a RLL encoder and MTR encoder back-to-back (i.e. concatenating them) in a write controller or transmitter will also not necessarily work because the constraint enforced first will not necessarily be satisfied after the second constraint is enforced. New techniques for designing MTR-RLL codes and associated encoders and decoders would therefore be desirable.